<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="rtl" lang="he-IL">




<head>

<?php include_http_metas() ?>
<?php include_metas() ?>

<?php include_title() ?>

<link rel="shortcut icon" href="<?php echo BASEURL;?>/favicon.ico" />
<link rel="stylesheet" href="http://yui.yahooapis.com/2.7.0/build/reset-fonts-grids/reset-fonts-grids.css" type="text/css"> 
<style>

html {

background:#EBEBEB;
}

input {
	
	color:#595959;
	font-size:15px;
	border:1px solid silver;
	padding:3px;
	margin:3px;
	
	
}
</style>
</head>


<body>

<div id="page">





<div style="width:100%;height:110px;display:none;">
<div style="padding:5px;">
	
		
	<div style="float:right;padding-top:0px;padding-right:5px;">
	<a href="<?php echo BASEURL;?>/">
	
	
	
	</a>
	</div>

</div>
</div>




<div style="background-color:#362D1C;font-size:20px;color:white;height:33px;">



<div style="float:right;padding:8px;font-size:14px;" dir="rtl">


</div>


<div style="float:left;padding-top:5px;padding-left:5px;">

Startup Index
</div>

</div>





<?php 	if ($this->getContext()->getUser()->isAuthenticated()) { ?>
 <div class="usermenu" dir="rtl" style="width:100%;padding:5px;color:#000;font-size:14px;text-align:right;">שלום, 
    
<?php

	echo $sf_user->getFullName();
	echo ' ['.link_to('הפרופיל שלי', 'user/edit?id='.$sf_user->getSignedUserId());  
	echo ', '.link_to('התנתקות', 'user/logout'); 
	if ($this->getContext()->getUser()->hasCredential('admin')):
	echo ', '.link_to('חברות ממתינות לאישור', 'user/drafts'); 
	echo ', '.link_to('הרשאות משתמשים', 'user/permissions'); 
	endif;

	// Modal Lightbox plugin
	/*$link_options = array(
	    'title' => 'Google Gtalk Gadget',
		'width' => '400px',
		'height'=> '490px'
	);    */

	//echo ', '.lw_link('Chat', '#chatbox', $link_options);

	echo ']';	
	
?>&nbsp;


  </div>
<?php } else { ?>

 <div class="usermenu" dir="ltr" style="width:100%;padding:5px;color:#000;font-size:14px;text-align:right;">
 
 <?php 
 	echo link_to('<img src="'.BASEURL.'/images/icons/key.png" height="12" width="12"> התחברות', 'user/login'); 
?> 

</div>

<?php } ?>

	<div id="content" style="padding:10px;">






	

	


<div id="doc3" class="yui-t3">					
	
	<div id="bd">

		<!-- Preset Templates control the width and alignment of the two blocks (div.yui-b). -->
		<!-- The wide column is wrapped in div#yui-main -->
		<div id="yui-main">
			<div class="yui-b" style="text-align:right;" dir="rtl">
<div style="background-color:#8B7550;height:100px;color:white;font-size:36px;padding:10px;">

<a style="color:white" href="<?php echo BASEURL;?>/">StartupIndex</a> הוא אינדקס המרכז את כל החברות במגזר הטכנולוגי.

</div>
<div style="background-color:#F4F0ED;font-size:18px;color:black;border-bottom:1px solid #D9D7C8;padding:10px;">

<?php 	if (!$this->getContext()->getUser()->isAuthenticated()) { ?>



<a href="<?php echo BASEURL;?>/signup"><img src="<?php echo BASEURL;?>/images/joinbutton.png"></a>

<?php } else {?>

<?php echo link_to('<img src="'.BASEURL.'/images/icons/add.png"> הוספת חברה','newcompany');?>


<?php }?>

</div>

<?php echo $sf_data->getRaw('sf_content') ?>



			</div>
		</div>

		<!-- the unwrapped div.yui-b takes a fixed width and alignment based on the class of the top-level containing node -->
		<div class="yui-b" style="text-align:right;" dir="rtl">
		
		
<?php echo form_tag('/search') ?> 

<div class="sidebarbox" style="margin-bottom:10px;border-color:#c8b9a6;height:25px;padding:0px;">


<div style="float:right">
<?php echo input_tag('name', 'חיפוש ב StartupIndex','onfocus="this.value=\'\'" style="width:200px;text-align:right;border:0px;font-size:12px;" dir="rtl"') ?>
</div>
<div style="float:left">

<input type="image" src="<?php echo BASEURL;?>/images/searcharrow.gif" id="searchsubmit" style="border:0px"<?php echo BASEURL;?>/>
</div>
</div>

</form>


<?php if (isset($company)):?>

<div class="sidebarbox" style="margin-bottom:10px;background-color:#f5f4f0">

<span style="font-size:14px">רוצה להטמיע את הוויג'יט של <?php echo $company->getName();?> אצלך באתר?</span><br>


<?php echo input_tag('embed', '<script type="text/javascript" src="http://www.startupindex.com/js/widget.js"></script><script>embedIframe('.$company->getId().')</script>
','style="width:250px;text-align:left;border:1px solid #c2b39e;font-size:12px;" dir="ltr"') ?><br>

<span style="font-size:10px;">העתק את הקוד שבתיבה והדבק אותו באתר או בבלוג</span>

</div>
<?php endif;?>

	
		
<?php if (isset($company)):?>
<div class="sidebarbox" style="margin-bottom:10px;">
<span style="font-size:18px;">

חברות קשורות
</span><br>

<?php 

//get Related companys by tag


$tags = $company->getTag2CompanysJoinTags();
$companyarray = array();

foreach ($tags as $tag) {
	
	$c = new Criteria();
	$c->add(Tag2CompanyPeer::TAG_ID,$tag->getTagId());
	$companies = Tag2CompanyPeer::doSelect($c);
	
	foreach ($companies as $cp) {
			
	if ($cp->getCompanyId() != $company->getId() && $cp->getCompanyId() != null) {
	$companyarray[] = $cp->getCompanyId();
	}
  }

}
$companyarray = array_unique($companyarray);

foreach ($companyarray as $companyy) {

$c = new Criteria();
$c->add(CompanyPeer::ID,$companyy);
$companyt = CompanyPeer::doSelectOne($c);

if ($companyt->getPublishstate() != 'draft') {

?>
<div style="width:310px;height:50px;text-align:right;padding-top:5px;">
<div style="float:right;width:95px;padding:3px;"><img src="<?php echo $companyt->getLogoUrl();?>" height="30" width="90"></div>
<div style="float:right;padding:3px;"><span  dir="ltr" style="color:#6F6236;font-size:13px;font-weight:bold;">

<?php 

if (strlen($companyt->getName()) > 20) {

	$companyname = mb_strcut($companyt->getName(), 0 ,20,'UTF-8');
	$companyname .= '...';
	echo link_to($companyname,'/company/'.$companyt->getId());
	
	
} else {
	
	echo link_to($companyt->getName(),'/company/'.$companyt->getId());
	
	
}



?>


</span><br><span style="font-size:10px;">
<?php 

if (strlen($companyt->getDescription()) > 100) {

$descriptioncut = mb_strcut($companyt->getDescription(), 0 ,100,'UTF-8');
echo $descriptioncut.'...';
} else {

	echo $companyt->getDescription();
	
}	


?></span></div>
</div>
<?php } }?>


</div>
<?php endif;?>


<div class="sidebarbox" style="margin-bottom:10px;">
<span style="font-size:18px;">

קטגוריות
</span><br>
<div style="overflow:auto;font-size:14px;">

<?php 

$ccats = new Criteria();
$cats = TagsPeer::doSelect($ccats);

foreach ($cats as $cat) {
	echo '<img src="/images/searcharrow.gif"> '.link_to($cat->getName().'','welcome/showByTag?name='.$cat->getName().'').'&nbsp;';
	
	
}

?>

</div>
</div>	

<div class="sidebarbox" style="margin-bottom:10px;font-size:12px;color:grey">
<span style="font-size:18px;color:black">

כתבות אחרונות

</span><br>

<style>
.feedTitle {
display:none;
}

.headline {
font-size:14px;
color:black;

}

.headline:before {
	padding-left:5px;
	content: url('/images/searcharrow.gif');
}

</style>
<script src="http://feeds.feedburner.com/co/jeLb?format=sigpro" type="text/javascript" ></script>

</div>

		
	
	
	</div>
		
		</div>
		
	</div>

	
</div>
		</div>






</div>





		</body>
</html>